import request from "@/utils/request";

// 查询发票管理列表
export function listInvoice(query) {
  return request({
    url: "/cld/invoice/list",
    method: "get",
    params: query,
  });
}

// 查询发票管理列表
export function groupByRegionList(query) {
  return request({
    url: "/cld/invoice/groupByRegionList",
    method: "get",
    params: query,
  });
}

// 查询发票管理详细
export function getInvoice(invoiceId) {
  return request({
    url: "/cld/invoice/" + invoiceId,
    method: "get",
  });
}

// 新增发票管理
export function addInvoice(data) {
  return request({
    url: "/cld/invoice",
    method: "post",
    data: data,
  });
}

// 修改发票管理
export function updateInvoice(data) {
  return request({
    url: "/cld/invoice",
    method: "put",
    data: data,
  });
}

// 删除发票管理
export function delInvoice(invoiceId) {
  return request({
    url: "/cld/invoice/" + invoiceId,
    method: "delete",
  });
}

// 发票头部统计
export function selectCldInvoiceStatistics(query) {
  return request({
    url: "/cld/invoice/selectCldInvoiceStatistics",
    method: "get",
    params: query,
  });
}
